import { service } from "@/api/request";

/**登录接口 */
export function login(params = {}) {
  return service({
    url: "/personal/login",
    method: "get",
    params: params,
  });
}

/**获取用户全部信息根据用户名接口 */
export function getByUsername(params = {}) {
  return service({
    url: "/personal/getByUsername",
    method: "get",
    params: params,
  });
}

/**修改密碼接口 */
export function updatePassword(data) {
  return service({
    url: "/personal/updatePassword",
    method: "post",
    data: data,
  });
}

/**修改信息接口 */
export function updateData(data) {
  return service({
    url: "/personal/updateData",
    method: "post",
    data: data,
  });
}

/**注册接口 */
export function create(data) {
  return service({
    url: "/personal/create",
    method: "post",
    data: data,
  });
}

export function test(params = {}) {
  return service({
    url: "/book/query",
    method: "get",
    params: params,
  });
}
